package com.example.testproj.design.builder;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import com.example.testproj.R;

public class BuilderTestActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_builder_test);
        Director director=new Director();
        Builder b1=new ConcreteBuilder1();
        Builder b2=new ConcreteBuilder1();

        director.Construct(b1);
        Product p1=b1.getResult();
        p1.Show();

        director.Construct(b2);
        Product p2=b2.getResult();
        p2.Show();
    }
}
